package com.yongoe.ecy.thirdNode.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yongoe.ecy.thirdNode.entity.ThirdNode;
import com.yongoe.ecy.thirdNode.mapper.ThirdNodeMapper;
import com.yongoe.ecy.thirdNode.service.ThirdNodeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 三级节点
 *
 * @author monad
 * @since 2024/03/10
 */
@Service
public class ThirdNodeServiceImpl extends ServiceImpl<ThirdNodeMapper, ThirdNode> implements ThirdNodeService {

    @Override
    public Page<ThirdNode> getThirdNodeByPage(Page<ThirdNode> page, ThirdNode thirdNode) {
        return baseMapper.getThirdNodeByPage(page, thirdNode);
    }

    // 新增三级节点
    @Override
    public Long addThirdNode(ThirdNode thirdNode) {
        return baseMapper.addThirdNode(thirdNode);
    }

    // 修改三级节点
    @Override
    public void updateThirdNode(ThirdNode thirdNode) {
        baseMapper.updateThirdNode(thirdNode);
    }

    // 删除三级节点(neo4j)
    @Override
    public void deleteThirdNodes(Long[] ids) {
        baseMapper.deleteThirdNodes(ids);
    }

    // 删除三级节点(mysql)
    @Override
    public void deleteByIds(Long[] ids) {
        baseMapper.deleteByIds(ids);
    }

    // 删除全部三级节点(mysql)
    @Override
    public void removeAll() {
        baseMapper.removeAll();
    }

}
